// pages/index/index.js
var app = getApp();


Page({
  /**
   * 页面的初始数据
   */
  data: {
    // 当前点中的对象
    currentBrand: {}
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var query = options || {};

    //获得dialog组件
    this.brandDialog = this.selectComponent("#brandDialog");
  },

  showBrandDialog(e) {
    const dataset = e.currentTarget.dataset,
      currentBrand = dataset.brand || {};
      console.log(currentBrand)
    this.setData({currentBrand})
    this.brandDialog.showDialog();
  },
})